package com.web.service.impl;

import com.web.dao.CityDao;
import com.web.domain.City;
import com.web.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by 陈国钰 on 2016/9/6.
 */
@Service
@Transactional(rollbackFor = {java.lang.Exception.class})
public class CityServiceImpl implements CityService {

    @Autowired
    private CityDao cityDao;


    public List<City> searchCity() {
        return cityDao.searchCity();
    }

    public List<String> searchLandmarks(String cityName) {
        return cityDao.searchLandmarks(cityName);
    }

    public List<City> searchAreaName(String cityName, String landmarks) {
        return cityDao.searchAreaName(cityName,landmarks);
    }
}
